import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-04-11
 * Time: 11:07
 */
public class TestDemo2 {
    public static void main(String[] args) {
        Calendar c=Calendar.getInstance();//获取当前日历时间
        c.add(Calendar.DATE,1000);
        Date date=c.getTime();//转成Date类型
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//格式化输出
        String str= sdf.format(date);
        System.out.println(str);
    }

}
